package com.sunye.elasticsearch.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 卖点索引
 *
 * @author paulG
 * @since 2020/10/14
 **/
@Data
@NoArgsConstructor
public class EsDogSellingPointIndex implements Serializable {

    private static final long serialVersionUID = 4018042777559970062L;

    //将原先的string类型拆分为text和keyword两种类型。它们的区别在于text会对字段进行分词处理而keyword则不会进行分词。
    /**
     * 卖点id
     */
    @Field(type = FieldType.Keyword)
    private String sellingPointId;


    /**
     * 优点
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String advantage;

    /**
     * 优点描述
     */
    @Field(type = FieldType.Text, fielddata = true)
    private String advantageDescribe;
}
